//
//  CedarBaseTableViewController.m
//  CedarFinancePH
//
//  Created by lshenrong on 2018/3/20.
//  Copyright © 2018年 cedarhd. All rights reserved.
//

#import "CedarBaseTableViewController.h"

@interface CedarBaseTableViewController ()

@end

@implementation CedarBaseTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = kAppBackgoundColor;
    self.tableView.tableFooterView = [[UIView alloc]init];
   // [self setLeftBarButton];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)dealloc{
    LogDealloc
}

#pragma mark -  UI

- (void)setCommonColorForNavigationBarAndView{
    self.view.backgroundColor = kWhiteColor;
    self.navigationController.navigationBar.barTintColor = kWhiteColor;
    self.navigationController.navigationBar.translucent = NO;
}

#pragma mark -

- (void)backItemClick{
    if (self.navigationController){
        [self.navigationController popViewControllerAnimated:YES];
    }
}

- (void)setLeftBarButton{
    if (self.navigationController) {
        UIButton *backButton = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 40, 40)];
        [backButton setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
        [backButton addTarget:self action:@selector(backItemClick) forControlEvents:UIControlEventTouchUpInside];
        UIBarButtonItem *backItem = [[UIBarButtonItem alloc]initWithCustomView:backButton];
        //覆盖返回按键
        self.navigationItem.leftBarButtonItem = backItem;
              self.navigationController.navigationBar.barTintColor = [UIColor whiteColor];;
    }
}




@end
